package com.amz.fc.base;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import freemarker.template.Configuration;
import freemarker.template.DefaultObjectWrapper;
import freemarker.template.Template;

public class FreeMarkerDemo {
	public static void main(String[] args) throws IOException {
		String path = FreeMarkerDemo.class.getResource("").getPath();
		Configuration cfg = new Configuration();
		cfg.setDirectoryForTemplateLoading(new File(path));
		cfg.setObjectWrapper(new DefaultObjectWrapper());
		Map<String, String> root = new HashMap<String, String>();
		root.put("user","zdz");
		Template temp = cfg.getTemplate("test.ftl");
		temp.getEncoding();
	}

}
